#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
//http://oj33.cn/contest.php?cid=1075
//https://blog.csdn.net/qq_37482202/article/details/89513877
struct node
{
	int x, y, w;

}e[250010];

int n, k;
int x[05], f[250010], y[505 ];
int main()
{
	
	int m;
	for (int i = 1; i <= m; i++)
	{
		cin >> e[i].x >> e[i].y >> e[i].w;
	}
	for (int i = 1; i <= m; i++)f[i] = i;
	sort(e + 1, e + 1 + m, com);
	int num, ans;
	for (int i = 1; i <= m; i++)
	{int f1=find(e[i].u,)

	}
	return 0;
}